package com.ljz.order.service;

import com.fasterxml.jackson.core.type.TypeReference;
import com.ljz.pojo.Order;
import com.ljz.pojo.User;
import com.ljz.service.OrderService;
import com.ljz.web.utils.JsonUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by LJZ.
 * User: UID
 * Date:2020/5/14
 * Time: 11:41
 * To change this template use File | Settings | File Templates.
 */
@Slf4j
@Service
public class OrderServiceImpl implements OrderService {

    @Override
    public Order getOrder(String orderId) {
        //TODO: 调用user-service获取用户信息
        //TODO: 调用item-service获取商品信息
        Order order = new Order();
        order.setId(orderId);
        return order;
    }

    @Override
    public void addOrder(Order order) {
        //TODO: 调用item-service减少商品库存
        //TODO: 调用user-service增加用户积分
        log.info("保存订单："+order);
    }
}
